import request from '@/utils/request'

// 查询兑换礼品
//列表
export function listExchangegifts(query) {
  return request({
    url: '/exchangegifts/exchangegifts/inquiryAndExchangeOfGifts',
    method: 'get',
    params: query
  })
}

export function getprizelist(query) {
  return request({
    url: '/exchangegifts/exchangegifts/queryLuckyDrawGifts',
    method: 'get',
    params: query
  })
}

// 查询兑换礼品
//详细
export function getExchangegifts(id) {
  return request({
    url: '/exchangegifts/exchangegifts/' + id,
    method: 'get'
  })
}

// 新增兑换礼品

export function addExchangegifts(data) {
  return request({
    url: '/exchangegifts/exchangegifts',
    method: 'post',
    data: data
  })
}

// 修改兑换礼品

export function updateExchangegifts(data) {
  return request({
    url: '/exchangegifts/exchangegifts/modifyMailingInformation',
    // url: '/exchangegifts/exchangegifts',
    method: 'put',
    data: data
  })
}

// 删除兑换礼品

export function delExchangegifts(id) {
  return request({
    url: '/exchangegifts/exchangegifts/' + id,
    method: 'delete'
  })
}

// 导出兑换礼品

export function exportExchangegifts(query) {
  return request({
    url: '/exchangegifts/exchangegifts/export',
    method: 'get',
    params: query
  })
}
